#!/bin/bash

baseDirForScriptSelf=$(cd "$(dirname "$0")"; pwd)
PWDNOW=${baseDirForScriptSelf}

if [ ! -f "${PWDNOW}/taginfo1.cfg" ]; then
	echo "找不到配置文件"
	exit 1
fi

eval $(grep logPath ${PWDNOW}/taginfo1.cfg) #
eval $(grep DAYID ${PWDNOW}/taginfo1.cfg) #

#DAY=`date -d "2 days ago" +"%Y%m%d"`
DAY=${DAYID}
logTagInfo=$logPath/taginfo/${DAY}
logTagInfoAnalyse=$logPath/Analyse/${DAY}

if [ ! -d "$logTagInfo" ]; then
        mkdir -p $logTagInfo
        chmod 755 $logTagInfo
fi

if [ ! -d "$logTagInfoAnalyse" ]; then
        mkdir -p $logTagInfoAnalyse
        chmod 755 $logTagInfoAnalyse
fi
echo "开始执行--taginfo_step2"
sh ${PWDNOW}/taginfo_cache2.sh ${DAY}
